package cn.sofwin.os.entity;

import cn.sofwin.core.mvc.support.bean.IdEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 用户订单实体
 * @author LetCode
 * @version 1.0
 * @date 2020-04-23 11:28:34
 *
 */
public class UserOrder extends IdEntity {
	
	private static final long serialVersionUID = -6050314959338078274L;
	
	/** 商品 */
	private Goods goods;
	
	/** 用户 */
	private User user;
	
	/** 商品数量 */
	private Integer total;
	
	/** 订单金额 */
	private Double amount;
	
	/** 创建时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date addTime;
	
	/** 支付时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date payTime;
	
	/** 完成时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date finishTime;
	
	/** 订单状态：-1.删除，0.冻结，1.等待支付，2.等待发货，3.等待收货，4.等待完成，5.订单完成，6.申请售后 */
	private Integer status;
	
	public UserOrder() {
	}

	public UserOrder(Integer id) {
		this.id = id;
	}
	
	public Goods getGoods() {
		return this.goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public Integer getTotal() {
		return this.total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}
	
	public Double getAmount() {
		return this.amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}
	
	public Date getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	
	public Date getPayTime() {
		return this.payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}
	
	public Date getFinishTime() {
		return this.finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}
	
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
}